/* 全局变量 */
:root {
    --primary-color: #ff6b6b;
    --primary-dark: #ff5252;
    --secondary-color: #48dbfb;
    --dark-color: #2d3436;
    --light-color: #f5f6fa;
    --success-color: #1dd1a1;
    --warning-color: #feca57;
    --danger-color: #ff6b6b;
    --gray-color: #dfe6e9;
    --dark-gray: #636e72;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --border-radius: 4px;
    --transition: all 0.3s ease;
}

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--light-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* 布局 */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 头部样式 */
header {
    background-color: white;
    box-shadow: var(--box-shadow);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

#nav-menu {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#nav-menu a {
    margin-right: 20px;
    font-weight: 500;
    transition: var(--transition);
}

#nav-menu a:hover {
    color: var(--primary-color);
}

#nav-menu a.active {
    color: var(--primary-color);
    font-weight: 600;
}

#auth-buttons {
    display: flex;
    gap: 10px;
}

#user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

#username-display {
    font-weight: 500;
}

/* 页脚样式 */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 20px 0;
    text-align: center;
    margin-top: auto;
}

/* 提示消息样式 */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: var(--border-radius);
    color: white;
    box-shadow: var(--box-shadow);
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

.toast-success {
    background-color: var(--success-color);
}

.toast-error {
    background-color: var(--danger-color);
}

.toast-info {
    background-color: var(--secondary-color);
}

.toast-warning {
    background-color: var(--warning-color);
}

.fade-out {
    animation: fadeOut 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* 响应式设计 */
@media (max-width: 768px) {
    #nav-menu {
        flex-direction: column;
        align-items: flex-start;
    }

    #nav-menu a {
        margin-bottom: 10px;
    }

    #auth-buttons {
        margin-top: 10px;
    }
}